package com.guomao.demoj;

import java.security.cert.X509Certificate;
import java.util.Collections;

public class JavaDemoA {


    public static void main(String[] args) {

//        sum(10);
//        sum(10, 20);

        sum();
        sum(10);
        sum(10, 20);
        sum(10, 20, 30, 40);
        sum(10, 20, 30, 40, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);

        add("root");
        add("root", 1, 2, 3);

//        Collections
    }


    //数据类型...变量名
    public static void sum(int... i) {
//        System.out.println(i);//I[@aa324s
//        System.out.println(i);
        int sum = 0;
        for (int x : i) sum += x;
        System.out.println(sum);
    }

    //    public static void add(String str, int... i) {
    public static void add(String str, float... f) {
//    public static void add(int... i, String str) {
//        System.out.println(i);//I[@aa324s
//        System.out.println(i);
        int sum = 0;
//        for (int x : i) sum += x;
//        System.out.println(sum);
    }

/*    public static void sum(int i) {

        System.out.println(i);
    }

    public static void sum(int i, int j) {

        System.out.println(i + j);
    }

    public static void sum(int i, int j, int k) {

        System.out.println(i + j + k);
    }

    public static void sum(int i, int j, int k, int l) {

        System.out.println(i + j + k + l);
    }*/


}
